@{
    Layout = null;
}
@using mvc.Models;
@model Product;

<html>

<head>
    <link rel="stylesheet" href="~/css/base.css">
</head>
<tbody>
    <table>
    
    @if (Model==null)
    {
         <tr hidden>
            <td>ID</td>
            <td>
                <input type="text" value="0" id="saveID">
            </td>
        </tr>
        <tr>
            <td>商品名称</td>
            <td>
                <input type="text" value="" id="saveProductName">
            </td>
        </tr>
        <tr>
            <td>供应商名称</td>
                 <td>
                <input type="text" value="" id="saveSupplier">
            </td>
        </tr>
        <tr>
            <td>价格</td>
            <td>
                <input type="text" value="" id="savePrice">
            </td>
        </tr>
        <tr>
            <td>库存数量</td>
            <td>
                <input type="text" value="" id="saveStock">
            </td>
        </tr>
        <tr>
            <td>备注</td>
            <td>
                <input type="text" value="" id="saveRemarks">
            </td>
        </tr>
    }
    else{

        <tr hidden>
            <td>ID</td>
            <td>
                <input type="text" value="@Model.Id" id="saveID">
            </td>
        </tr>
        <tr>
            <td>商品名称</td>
            <td>
                <input type="text" value="@Model.ProductName" id="saveProductName">
            </td>
        </tr>
        <tr>
            <td>供应商名称</td>
                 <td>
                <input type="text" value="@Model.Supplier" id="saveSupplier">
            </td>
        </tr>
        <tr>
            <td>价格</td>
            <td>
                <input type="text" value="@Model.Price" id="savePrice">
            </td>
        </tr>
        <tr>
            <td>库存数量</td>
            <td>
                <input type="text" value="@Model.Stock" id="saveStock">
            </td>
        </tr>
        <tr>
            <td>备注</td>
            <td>
                <input type="text" value="@Model.Remarks" id="saveRemarks">
            </td>
        </tr>
       
    }
    <input type="button" value="保存" onclick="btnSave()">
    <input type="button" value="取消并返回" onclick="btnReturns()">
      </table>  
          <script src="~/lib/jquery/dist/jquery.js"></script>
    <script src="~/js/base.js"></script>   
</tbody>
</html>